package com.rc.saas.mini.common.base;

import org.springframework.data.annotation.Transient;

import java.io.Serializable;
import java.text.SimpleDateFormat;

/**
 * Created by sven on 2019/8/3
 */
public abstract class BaseMongoEntity implements Serializable {
    //日志按年月分开保存
    protected static SimpleDateFormat yyyyMM = new SimpleDateFormat("yyyyMM");

    //按照订单的实现开始充电时间创建按月分表，而不是订单的生成时间
    @Transient
    protected String collectionName;

    protected String _id;

    protected String source="APP"; //日志来源
    protected String tenantCode; //tenantCode 运营商
    protected String tenantOperatorCode;//分销商

    public String getCollectionName() {
        return collectionName;
    }

    public void setCollectionName(String collectionName) {
        this.collectionName = collectionName;
    }

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    public String getTenantOperatorCode() {
        return tenantOperatorCode;
    }

    public void setTenantOperatorCode(String tenantOperatorCode) {
        this.tenantOperatorCode = tenantOperatorCode;
    }
}
